package com.chenyongjing.design.pattern.state.general.simple;

/**
 * @Author chen
 * @Date 2022/11/20 19:16
 */
public class Context {
    private static final IState STATE_A =new ConcreteStateA();
    private static final IState STATE_B =new ConcreteStateB();

    private IState currentState = STATE_A;

    void setState(IState state){
        this.currentState=state;
    }
    void handle(){
        this.currentState.handle();
    }

}
